package com.example.demo.config

import org.springframework.context.annotation.Configuration
import org.springframework.web.servlet.config.annotation.CorsRegistry

import org.springframework.web.servlet.config.annotation.WebMvcConfigurer


//@Configuration
//class CorsConfig : WebMvcConfigurer {
//    override fun addCorsMappings(registry: CorsRegistry) {
//        registry.addMapping("/**").allowedOrigins("*").allowCredentials(true).allowedMethods(*ORIGINS).maxAge(3600)
//    }
//    companion object {
//        val ORIGINS = arrayOf("GET", "POST", "PUT", "DELETE")
//    }
//}